<?php
/**
 * Smarty plugin
 * @package Smarty
 * @subpackage plugins
 */


/**
 * Smarty translate modifier plugin
 *
 * Type:     modifier<br>
 * Name:     translate<br>
 * Purpose:  Translates phrase into another language.
 *
 * @author Svilen Spasov <svilen@svilen.com>
 * @param string
 * @return string
 */
function smarty_modifier_translate($string)
{
    $translatedString = (!empty($string)) ? $string : '' ;
    // Should be rewritten according to the translate system
    $string = trim($string);
    
    
    switch ($string) {
    	case 'ssh':
      	$translatedString = 'SSH'; 
      	break;
      case 'sql_quota':
      	$translatedString = 'MySQL Quota'; 
      	break;
      case 'sql':
      	$translatedString = 'MySQL DataBase(s)'; 
      	break;
      case 'ip':
      	$translatedString = 'IP'; 
      	break;
      case 'traffic':
      	$translatedString = 'Traffic'; 
      	break;
      case 'domain':
      	$translatedString = 'Domain(s) Hosted'; 
      	break;
      case 'disk_space':
      	$translatedString = 'Disk Space'; 
      	break;
      case 'com/net/org/us/info/biz':
      	$translatedString = 'Domain Registration'; 
      	break;
      case 'template':
      	$translatedString = 'Template'; 
      	break;
      case 'wallet':
      	$translatedString = 'Wallet Balance Refill'; 
      	break;
    }
    
    return $translatedString;
}

/* vim: set expandtab: */

?>
